Conventionally, in a copier, a laser-beam printer or the like using an electrophotographic technology, an image forming apparatus where various image forming elements are provided as a unit and removably attached to the apparatus main body has been provided. When the life of the unit has expired, it is exchanged with a new one. The image forming apparatus is managed in this manner.
As shown in FIG. 10, the unit used for image formation is a cartridge including an electrostatic drum as an image holder, a charging roller as a charging member to uniformly charge the surface of the electrostatic drum, and a developing device including a developing roller and a developing material container as a developing member for supplying toner as developing material to the electrostatic drum. The cartridge is removably attached to the apparatus main body.
In recent years, a cartridge with a nonvolatile memory (e.g., an EEPROM (hereinbelow, “memory”)) has been utilized as the above cartridge. The cartridge with a memory holds information on the life of the cartridge, such as the drum revolution accumulated time and the remaining amount of toner. A printer controller judges the life of the toner cartridge based on the information obtained by communication of this information, and determines whether to cancel a print signal from a controller or the like.
Data can be written/read to/from the memory of the cartridge. That is, data writing/reading to/from the memory can be performed based on an instruction from the printer controller. Further, regarding data which has been written into the memory and which will not be rewritten, the data can be set to a rewriting-disabled status (locked). Once the data is locked, thereafter, writing cannot be made and only reading is possible from the corresponding area. Data locking is performed in 1 byte units, 2 byte units, 4 byte units, 40 byte units or the like. Thus a data size lockable at once differs in accordance with the memory.
Further, the lockable data size is not necessarily fixed regarding all the data areas in a memory. In some memories, locking can be performed in 1 byte units in one part or area of the memory, and locking can be performed in 4 byte units in another part. In this manner, the lockable data size differs in this memory.
Among various data structures that may be used for storage into the memory, a double-buffer structure is known as a data structure for improvement of data reliability. The entire data is divided for storage in a main buffer and a backup buffer, and data indicating the same meaning is stored in both buffers, and upon coincidence of the data between the both buffers, corresponding data is utilized as reliable data.
Further, as a method for increasing reliability, a check sum may be provided in respective buffers of the double-buffer structure. In this method, every time data is updated, the check sum is updated and stored. Further, the check sum is checked upon use of memory data during the start-up of the apparatus main body, or the like, and if an abnormality is detected in the check sum, all the data in the buffer where the abnormality has been detected in the check sum is recovered by using data in the buffer where no abnormality has been detected in the check sum, thereby permitting the use of the memory thereafter.
In the above conventional art, the data in the memory can be locked when it is determined that rewriting is not to be performed. But, even if the data indicates only one of 2 bit-representable statuses, data lock is performed on a predetermined unit of area such as 1 byte (8 bits) according to the internal structure of the memory. That is, since the data size must be expanded to a lockable minimum unit, the efficiency of use of the data areas of the memory is lowered, and wasted data areas occur.
Further, in the case where the check sum is provided in the respective buffers of the double-buffer structure, the order of data storage is as follows.
(1) data update in main buffer
(2) check sum update in main buffer
(3) data lock in main buffer
(4) data update in backup buffer
(5) check sum update in backup buffer
In the stage (2), if an error occurs, the data in the main buffer is recovered by using the data in the backup buffer. When data rewrite instruction is issued again, data in the corresponding area is rewritten. In a case where interval between issuance of the data rewrite instruction is very long, although data change timing has come once, data rewriting is not performed until the next data change timing comes.